package ModelLayer;


/**
 * Write a description of class LineItem here.
 * 
 * @author (your name) 
 * @version (a version number or a date)
 */
public class LineItem
{
    // instance variables - replace the example below with your own
    private Product product;
    private int quantity;

    /**
     * Constructor for objects of class LineItem
     */
    public LineItem(Product product)
    {
        // initialise instance variables
        this.product = product;
        this.quantity = 1;       
    }
    public LineItem(Product product, int quantity) 
    {
        this.product = product;
        this.quantity = quantity;
    }
    
    // GET
    public Product getProduct() 
    {
        return product;
    }
    public int getQuantity() 
    {
        return quantity;
    }
    
    // SET
    public void setProduct(Product newProduct) 
    {
        product = newProduct;
    }
    public void setQuantity(int newQuantity) 
    {
        quantity = newQuantity;
    }
    
}
